/*
 * Created by JFormDesigner on Mon Feb 06 09:24:46 ICT 2012
 */

package View;

import java.awt.*;
import java.awt.event.ActionListener;

import javax.swing.*;
import javax.swing.border.*;

/**
 * @author Khainx
 */
public class EmployeeView extends JPanel {
	public EmployeeView() {
		initComponents();
	}

	private void initComponents() {
		// JFormDesigner - Component initialization - DO NOT MODIFY  //GEN-BEGIN:initComponents
		panel3 = new JPanel();
		btnExit = new JButton();
		panel1 = new JPanel();
		label2 = new JLabel();
		label3 = new JLabel();
		panel2 = new JPanel();
		label7 = new JLabel();
		label5 = new JLabel();
		btnSearch = new JButton();
		btnViewRequest = new JButton();
		btnRequest = new JButton();
		label6 = new JLabel();
		desktopPane1 = new JDesktopPane();

		//======== this ========
		setLayout(new BorderLayout());

		//======== panel3 ========
		{
			panel3.setBorder(new EtchedBorder());
			panel3.setLayout(new FlowLayout(FlowLayout.RIGHT));

			//---- btnExit ----
			btnExit.setText("Exit");
			panel3.add(btnExit);
		}
		add(panel3, BorderLayout.SOUTH);

		//======== panel1 ========
		{
			panel1.setBorder(new EtchedBorder());
			panel1.setLayout(new GridBagLayout());
			((GridBagLayout)panel1.getLayout()).columnWidths = new int[] {0, 0};
			((GridBagLayout)panel1.getLayout()).rowHeights = new int[] {0, 0, 0};
			((GridBagLayout)panel1.getLayout()).columnWeights = new double[] {1.0, 1.0E-4};
			((GridBagLayout)panel1.getLayout()).rowWeights = new double[] {0.0, 0.0, 1.0E-4};

			//---- label2 ----
			label2.setText("EmployeeTransferManagement");
			label2.setHorizontalAlignment(SwingConstants.CENTER);
			label2.setFont(new Font("Tahoma", Font.BOLD, 18));
			panel1.add(label2, new GridBagConstraints(0, 0, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 0), 0, 0));

			//---- label3 ----
			label3.setText("Employee Account");
			label3.setFont(new Font("Tahoma", Font.BOLD, 18));
			label3.setHorizontalAlignment(SwingConstants.CENTER);
			panel1.add(label3, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 0, 0), 0, 0));
		}
		add(panel1, BorderLayout.NORTH);

		//======== panel2 ========
		{
			panel2.setBorder(new EtchedBorder());
			panel2.setLayout(new GridBagLayout());
			((GridBagLayout)panel2.getLayout()).columnWidths = new int[] {0, 0, 0, 0, 0, 0, 0, 0};
			((GridBagLayout)panel2.getLayout()).rowHeights = new int[] {0, 0, 0, 0, 0};
			((GridBagLayout)panel2.getLayout()).columnWeights = new double[] {0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0E-4};
			((GridBagLayout)panel2.getLayout()).rowWeights = new double[] {0.0, 0.0, 0.0, 1.0, 1.0E-4};
			panel2.add(label7, new GridBagConstraints(1, 0, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 5), 0, 0));
			panel2.add(label5, new GridBagConstraints(0, 1, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 5), 0, 0));

			//---- btnSearch ----
			btnSearch.setText("Search");
			btnSearch.setPreferredSize(new Dimension(53, 40));
			panel2.add(btnSearch, new GridBagConstraints(1, 1, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 5), 0, 0));

			//---- btnViewRequest ----
			btnViewRequest.setText("View Request");
			panel2.add(btnViewRequest, new GridBagConstraints(3, 1, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 5), 0, 0));

			//---- btnRequest ----
			btnRequest.setText("Request");
			btnRequest.setPreferredSize(new Dimension(53, 40));
			panel2.add(btnRequest, new GridBagConstraints(5, 1, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 5), 0, 0));
			panel2.add(label6, new GridBagConstraints(6, 1, 1, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 5, 0), 0, 0));

			//======== desktopPane1 ========
			{
				desktopPane1.setBackground(Color.white);
			}
			panel2.add(desktopPane1, new GridBagConstraints(1, 3, 5, 1, 0.0, 0.0,
				GridBagConstraints.CENTER, GridBagConstraints.BOTH,
				new Insets(0, 0, 0, 5), 0, 0));
		}
		add(panel2, BorderLayout.CENTER);
		// JFormDesigner - End of component initialization  //GEN-END:initComponents
	}

	// JFormDesigner - Variables declaration - DO NOT MODIFY  //GEN-BEGIN:variables
	private JPanel panel3;
	private JButton btnExit;
	private JPanel panel1;
	private JLabel label2;
	private JLabel label3;
	private JPanel panel2;
	private JLabel label7;
	private JLabel label5;
	private JButton btnSearch;
	private JButton btnViewRequest;
	private JButton btnRequest;
	private JLabel label6;
	private JDesktopPane desktopPane1;
	// JFormDesigner - End of variables declaration  //GEN-END:variables
	public void doSearch(ActionListener listener){
		this.btnSearch.addActionListener(listener);
	}
	public void doViewRequest(ActionListener listener){
		this.btnViewRequest.addActionListener(listener);
	}
	public void doRequest(ActionListener listener){
		this.btnRequest.addActionListener(listener);
	}
	public void doExit(ActionListener listener){
		this.btnExit.addActionListener(listener);
	}

	public void addFrame(JInternalFrame iframe) {
		// TODO Auto-generated method stub
		this.desktopPane1.add(iframe);
	}
}
